﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using DAL;

namespace BLL
{
    public class EntityManagement
    {

        #region Member variables

        /// <summary>
        /// 
        /// </summary>
        private EnittyDAO dao = new EnittyDAO();

        #endregion

        #region Constructors & Finalizers
        #endregion

        #region Nested Enums, Structs, and Classes
        #endregion

        #region Properties
        #endregion

        #region Methods

        /// <summary>
        /// Submit the changes to database.
        /// </summary>
        public virtual void UpdateChanges()
        {
            dao.CommitUpdate();
        }

        /// <summary>
        /// 
        /// </summary>
        public void BeginDbTransction()
        {
            dao.BeginTransaction();
        }

        /// <summary>
        /// 
        /// </summary>
        public void CommitDbTransanction()
        {
            dao.CommitTransaction();
        }

        /// <summary>
        /// roll back the transaction when exceptions
        /// </summary>
        public void RollBackDbTransaction()
        {
            dao.RollBackTransaction();
        }

        #endregion
    }
}
